package com.mgkj.dto.yf;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;

/**
 * @author : ssy
 * @date: 2024-04-01
 * @Description:
 */
@Data
@ApiModel("无源出库单身Dto")
public class StockTradingBody {

    @ApiModelProperty(value = "单别",required = true)
    @NotBlank(message = "单别不能为空")
    @JsonProperty("TB001")
    private String TB001;

    @ApiModelProperty(value = "单号",required = true)
    @NotBlank(message = "单号不能为空")
    @JsonProperty("TB002")
    private String TB002;

    @ApiModelProperty(value = "序号",required = true)
    @NotBlank(message = "序号不能为空")
    @JsonProperty("TB003")
    private String TB003;

    @ApiModelProperty(value = "品号",required = true)
    @NotBlank(message = "品号不能为空")
    @JsonProperty("TB004")
    private String TB004;

    @ApiModelProperty(value = "数量",required = true)
    @DecimalMin(value = "0.01",message = "数量不许小于0")
    @JsonProperty("TB007")
    private Double TB007;

    @ApiModelProperty(value = "单位",required = true)
    @NotBlank(message = "单位不能为空")
    @JsonProperty("TB008")
    private String TB008;

    @ApiModelProperty(value = "转出库",required = true)
    @NotBlank(message = "转出库不能为空")
    @JsonProperty("TB012")
    private String TB012;

    @ApiModelProperty(value = "转入库",required = true)
    @NotBlank(message = "转入库不能为空")
    @JsonProperty("TB013")
    private String TB013;

    @ApiModelProperty(value = "转出库位",required = true)
    @NotBlank(message = "转出库位不能为空")
    @JsonProperty("TB029")
    private String TB029;

    @ApiModelProperty(value = "转入库位",required = true)
    @NotBlank(message = "转入库位不能为空")
    @JsonProperty("TB030")
    private String TB030;

    @ApiModelProperty(value = "审核码",required = true)
    @Pattern(regexp = "^[NY]$",message = "审核码只允许输入N|Y")
    @JsonProperty("TB018")
    private String TB018;

}
